import React, { Component } from 'react'
import PropTypes from 'prop-types'
import StepZilla from 'react-stepzilla'

export const WizardFormWrapper = ({
                                   steps
                                 }) => {
  return (
    <div className='example'>
      <div className='step-progress'>
        <StepZilla
          steps={steps}
          preventEnterSubmission={true}
          nextTextOnFinalActionStep={"Save"}
          hocValidationAppliedTo={[3]}
          startAtStep={window.sessionStorage.getItem('step') ? parseFloat(window.sessionStorage.getItem('step')) : 0}
          onStepChange={(step) => window.sessionStorage.setItem('step', step)}
        />
      </div>
    </div>
  )
}
WizardFormWrapper.propTypes = {

}

export default WizardFormWrapper
